package com.aaa.controller;

import com.aaa.service.PermissionService;
import com.aaa.service.UserService;
import com.aaa.vo.LoginVo;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: qy158-system
 * @description:
 * @author: 闫克起2
 * @create: 2022-10-10 10:41
 **/
@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private UserService userService;
    @Autowired
    private PermissionService permissionService;
    @PostMapping("/login")
    public Result login(@RequestBody LoginVo loginVo){
        return userService.findByNameAndPass(loginVo.getUsername(),loginVo.getPassword());
    }
}















